import {
	createStore
} from 'vuex';

const store = createStore({
	state: {
		//状态管理器中定义的数据源
		content: 0,
		chatList: [],
	},
	mutations: {
		//同步操作
		changeContent(state, val) {
			state.content = val
		},
		changeChatList(state, val) {
			state.chatList = val
		},
	},
	actions: {
		//异步操作
	},
	//getters相当于计算属性
	getters: {}
})

export default store;